<template>
  <el-drawer v-model="visible" direction="rtl" :before-close="handleClose">
    <template #header>
      <div class="drawer-header">
        <img :src="$getAssetsFile('draw-tit.png')" alt="" />
      </div>
    </template>
    <span>Hi, there!</span>
  </el-drawer>
</template>

<script setup>
import "@/assets/styles/header.css";
import "@/assets/styles/list.css";

defineOptions({
  name: "RightDrawer",
  /** 禁用自动继承属性 */
  inheritAttrs: false
});

const props = defineProps({
  open: {
    type: Boolean,
    default: false
  },
  sortNum: {
    type: Number,
    default: 1
  }
});
const emits = defineEmits(["update:open"]);

let visible = computed({
  get() {
    return props.open;
  },
  set(val) {
    emits("update:open", val);
  }
});
const handleClose = () => {
  emits("update:open", false);
};
</script>

<style lang="scss" scoped></style>
